﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace FileDownLoadSystem.Core.Configuration;

public class AppSetting
{
    public static Dictionary<string,string> Connections { get; set; }
    // 获取Connection对象
    private static Connection _connection;

    public static void Init(IServiceCollection services, IConfiguration configuration)
    {
        // Microsoft.Extensions.Configuration.Binder
        _connection = configuration.GetSection("Connection").Get<Connection>();
    }
}